From ca7b223bf0c4f81bc7845376f9ded40ede9220d6 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Fri, 17 Jul 1998 03:56:13 +0000 Subject: [PATCH] care for the posssibility that someone destroys the entry on the Fri Jul 17 05:30:47 1998 Tim Janik * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that someone destroys the entry on the ::activate signal. --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkentry.c | 7 ++++++- 8 files changed, 41 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 094afee65b..4d3dbd938e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Fri Jul 17 05:30:47 1998 Tim Janik + + * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that + someone destroys the entry on the ::activate signal. + Fri Jul 17 01:21:32 1998 Tim Janik * gtk/gtkarrow.c (gtk_arrow_expose): use misc->xpad for x calculation diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 01dfffa9ec..8ca9a9e788 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1131,7 +1131,12 @@ gtk_entry_key_press (GtkWidget *widget, break; } - if (return_val && (editable->current_pos != initial_pos)) + /* since we emit signals from within the above code, + * the widget might already be destroyed or at least + * unrealized. + */ + if (GTK_WIDGET_REALIZED (editable) && + return_val && (editable->current_pos != initial_pos)) { if (extend_selection) { -- 2.30.2